eric7.EricWidgets.EricPasswordEdit

Module implementing a specialized line edit widget for entering secrets.

Global Attributes

None

Classes

EricPasswordEdit Class implementing a specialized line edit widget for entering secrets.
EricPasswordEditMode Class defining the various modes for the password edit widget.

Functions

None


EricPasswordEdit

Class implementing a specialized line edit widget for entering secrets.

It includes a line edit and a button to toggle the visibility of entered secret. The edit can be used in different modes, which mainly affect the strings shown. The default mode is EricPasswordEditMode.Password. When mode is EricPasswordEditMode.User, the strings must be given AFTER this mode was set with EricPasswordEdit.setMode().

Signals

editingFinished()
emitted to signal the end of editing
returnPressed()
emitted to signal pressing the 'Return' or 'Enter' key
textChanged(str)
emitted to signal any change of the text (programmatic or by the user)
textEdited(str)
emitted to signal changes made by the user
visibilityToggled(bool)
emitted to signal a change of the secret visibility

Derived from

QWidget

Class Attributes

None

Class Methods

None

Methods

EricPasswordEdit Constructor
__toggleVisibility Private slot to toggle the password visibility.
clear Public slot to clear the line edit.
placeholderText Public method to get the placeholder text of the line edit.
selectAll Public slot to select the text of the line edit.
setMode Public method to set the mode of the password edit.
setPlaceholderText Public method to set the placeholder text of the line edit.
setText Public slot to set the text of the line edit.
setToolTip Public method to set the tool tip text of the line edit.
setUserStrings Public method to set the strings in User mode.
text Public method to get the entered text.
toolTip Public method to get the tool tip text of the line edit.

Static Methods

None

EricPasswordEdit (Constructor)

EricPasswordEdit(parent=None)

Constructor

parent (QWidget (optional))
reference to the parent widget (defaults to None)

EricPasswordEdit.__toggleVisibility

__toggleVisibility(checked)

Private slot to toggle the password visibility.

checked (bool)
state of the visibility toggle button

EricPasswordEdit.clear

clear()

Public slot to clear the line edit.

EricPasswordEdit.placeholderText

placeholderText()

Public method to get the placeholder text of the line edit.

Return:
placeholder text
Return Type:
str

EricPasswordEdit.selectAll

selectAll()

Public slot to select the text of the line edit.

EricPasswordEdit.setMode

setMode(mode)

Public method to set the mode of the password edit.

mode (EricPasswordEditMode)
mode of the edit

EricPasswordEdit.setPlaceholderText

setPlaceholderText(text)

Public method to set the placeholder text of the line edit.

text (str)
placeholder text

EricPasswordEdit.setText

setText(text)

Public slot to set the text of the line edit.

text (str)
text string

EricPasswordEdit.setToolTip

setToolTip(text)

Public method to set the tool tip text of the line edit.

text (str)
tool tip text

EricPasswordEdit.setUserStrings

setUserStrings(checkedToolTip="", uncheckedToolTip="", editToolTip="")

Public method to set the strings in User mode.

checkedToolTip (str (optional))
tool tip text for the visibility button in checked state (defaults to "")
uncheckedToolTip (str (optional))
tool tip text for the visibility button in unchecked state (defaults to "")
editToolTip (str (optional))
tool tip text for the line edit (defaults to "")

EricPasswordEdit.text

text()

Public method to get the entered text.

Return:
text of the line edit
Return Type:
str

EricPasswordEdit.toolTip

toolTip()

Public method to get the tool tip text of the line edit.

Return:
tool tip text
Return Type:
str
Up


EricPasswordEditMode

Class defining the various modes for the password edit widget.

Derived from

enum.Enum

Class Attributes

Password
Pin
Token
User

Class Methods

None

Methods

None

Static Methods

None
Up